 # Create your views here.
from django.shortcuts import HttpResponse
from django.shortcuts import render_to_response
import datetime
import psycopg2
import load_ora_links

def indexing(request):
    html = "<H1>People12222</H1><HR>"
    ln = load_ora_links
    ln.save("d","d")
    return render_to_response('index.html', {'current_date': datetime.datetime.now()})

def indexing_mako(request):
    html = "<H1>People12222</H1><HR>"
    dsn = 'dbname=%s' % dbname
    if dbhost is not None:
        dsn += ' host=%s' % dbhost
    if dbport is not None:
        dsn += ' port=%s' % dbport
    if dbuser is not None:
        dsn += ' user=%s' % dbuser
    if dbpass is not None:
        dsn += ' password=%s' % dbpass

    conn = psycopg2.connect(dsn)
    cur = conn.cursor()
    cur.execute("SELECT file_save('deletemeuser3@mail.bzcrew.com','',ARRAY['action','repository_id','name'],ARRAY['1','2012-07-03 11:31:07.349459','file_name795.txt']);")
    for record in cur:
         print record[0]    
    return render_to_response('index_mako.html', {'current_date': datetime.datetime.now()})

